package com.ygqh.baby.po;

import java.math.BigDecimal;
import java.util.Date;

import com.ygqh.baby.ao.OperationType;
import com.ygqh.baby.ao.RebateType;

public class YgCommissionDetail {
	private Long id;

	private Long commissionId;

	private Long balanceDetailId;

	private String orderId;

	private String operation;

	private BigDecimal price;

	private RebateType rebateType;

	private BigDecimal rate;

	private Date createTime;

	private Long userId;
	// =================

	private OperationType operationType;

	public OperationType getOperationType() {
		return operationType;
	}

	public void setOperationType(OperationType operationType) {
		this.operationType = operationType;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getCommissionId() {
		return commissionId;
	}

	public void setCommissionId(Long commissionId) {
		this.commissionId = commissionId;
	}

	public Long getBalanceDetailId() {
		return balanceDetailId;
	}

	public void setBalanceDetailId(Long balanceDetailId) {
		this.balanceDetailId = balanceDetailId;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId == null ? null : orderId.trim();
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public RebateType getRebateType() {
		return rebateType;
	}

	public void setRebateType(RebateType rebateType) {
		this.rebateType = rebateType;
	}

	public BigDecimal getRate() {
		return rate;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getOperation() {
		if (operationType != null) {
			return operationType.getTitle();
		}
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

}